package com.lottery.ruok.lottrey.adapter;

import android.content.Context;
import android.view.View;

import com.lottery.ruok.lottrey.retrofitModule.response.GetWholeCategoryResponse;
import com.lottery.ruok.lottrey.ui.component.PrizeItemView;

import java.util.List;

/**
 * Created by ASUS on 2017/11/13.
 */

public class ChildPrizeAdapter extends BaseListAdapter<GetWholeCategoryResponse.ItemsBean> {

    public ChildPrizeAdapter(Context context) {
        super(context);
    }

    public ChildPrizeAdapter(Context context, List<GetWholeCategoryResponse.ItemsBean> list) {
        super(context, list);
    }

    @Override
    protected View createItemView(Context mContext) {
        return new PrizeItemView(mContext);
    }

    @Override
    protected void onBindView(View itemView, int position) {
        if (itemView instanceof PrizeItemView) {
            PrizeItemView view = (PrizeItemView) itemView;
            view.setData(getList().get(position));
        }
    }
}